|
Is There a Way to Identify an E5 Device via Software? Application software may need to know the type of E5 device on which it runs. For example, some software features may only be enabled if the software operates on an E520 device and not on smaller E5 family members. Unlike the A7, there is no identification register in the E5 containing a part identifier. However, this information is embedded within the E5’s internal primary boot PROM. The six-byte revision identifier for each device starts at CSI physical address 0x000003. The bytes for each device member are described below.
// typedef unsigned char U8;
// mask[i] U8 E5HAL_ROM_ID_MASK[] = {0xff, 0xff, 0x1f, 0x1f, 0x1f, 0x1f};
// value[i] U8 E5HAL_ROM_ID_E502[] = {0x7f, 0xe9, 0x00, 0x01, 0x00, 0x00}; U8 E5HAL_ROM_ID_E505[] = {0x7f, 0xe9, 0x00, 0x01, 0x01, 0x00}; U8 E5HAL_ROM_ID_E512[] = {0x7f, 0xe9, 0x00, 0x02, 0x02, 0x00}; U8 E5HAL_ROM_ID_E520[] = {0x7f, 0xe9, 0x00, 0x04, 0x03, 0x00};
To read the six bytes from internal ROM, use a data mapper to map to a page that contains CSI address 0x3 to 0x8 into the 8051’s XDATA memory space. Using the e5hal_csimem_readBytes() routine in the E5HAL driver library is another way to read the six bytes. Mask out the bits that are for internal use only by ANDing the mask with ROM data. VALUE[i] == E5HAL_ROM_ID_MASK[i] & E5HAL_ROM_ID_E50x[i]; … where i is the byte index into the six byte mask or ROM data field and x indicates the desired device type. Alternatively, there is a quick shortcut to distinguish between among all current E5 production devices. The masked ID byte 5, located at address 0x000007, is sufficiently unique to distinguish among the four E5 family members.
© 2001 by Triscend Corporation. All rights reserved. |